package com.liukai.todo_android.common.utils;

import android.content.Context;
import android.content.SharedPreferences;

/**
 * @author ：liukai
 * @date ：Created in 2021/8/8 2:46 下午
 * @description：
 * @modified By：
 * @version: $
 */
public class Constants {

    //    public static final String BASE_URL = "http://172.16.3.34:7060";
    public static final String BASE_URL = "http://192.168.11.139:7060";
//    public static final String BASE_URL = "http://192.168.11.139:7060";

    public static final String TOKEN_KEY = "Authorization";

    public static String TOKEN = "";

    public static final String SHARE_NAME_TOKEN = "TOKEN";

    public static final String SHARE_NAME_USER = "USER";

    public static final String USER_ID_KEY = "userId";

    public static final int SCHEDULE_FINISHED = 1;
    public static final int SCHEDULE_NOT_FINISHED = 0;

    public static final int TIMING_TYPE_NO = 0;
    public static final int TIMING_TYPE_UP = 1;
    public static final int TIMING_TYPE_DOWN = 2;

    public static final String COUNT_DOWN_BROADCAST_RECEIVER = "com.liukai.todo_android.ui.activity.ConcentrationActivity.CountDownBroadcastReceiver";

    public static final String ITEM_VO_KEY = "itemVo";
    public static final String TIMING_TYPE_KEY = "timingType";
    public static final String COUNT_DOWN_TIME_KEY = "countDownTime";
    public static final String COUNT_DOWN_STATUS_KEY = "countDownStatus";

    public static String getToken(Context context) {
        return SharedPreferencesUtil.getString(context, SHARE_NAME_TOKEN, TOKEN_KEY);
    }

    public static Long getUserId(Context context) {
        return SharedPreferencesUtil.getLong(context, SHARE_NAME_USER, USER_ID_KEY);
    }

}
